#include <iostream>
#include <cmath>

using namespace std;

double PI = acos(-1.0);

#define eps 1e-5

double area[10005];

int n, m;

bool check(double mid){
    int sum = 0;

    for (int i = 0; i < n; i++){
        sum += (int)(area[i] / mid);
    }

    if (sum >= m){
        return true;
    }
    else{
        return false;
    }
}

int main(){
    int t;
    cin >> t;

    while (t--){
        cin >> n >> m;
        ++m;

        double maxx = 0;
        for (int i = 0; i < n; i++){
            int r;
            cin >> r;

            area[i] = PI * r * r;
            if (maxx < area[i]){
                maxx = area[i];
            }
        }

        double left = 0, right = maxx;
        while ((right - left) > eps){
            double mid = left + (right - left) / 2;

            if (check(mid)){
                left = mid;
            }
            else{
                right = mid;
            }
        }
        
        cout << fixed;
        cout.precision(4);
        cout << left;
    }

    return 0;
}